<!--
/**
* @author xuyh0817
* @email xuyh0817@foxmail.com
* @date 2022-02-19 00:00
* @version 2.0.0
* @doc todo
* @website todo
* @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
*/
-->
<template>
  <!--  布局的整体插槽-->
  <x-render-extend-slot
    v-if="hasSlot(attrs.layoutName)"
    :componentFunc="getSlot(attrs.layoutName)"
    :data="attrs"
  ></x-render-extend-slot>

  <a-divider v-bind="attrs" v-else-if="!currentValue"></a-divider>
  <a-divider v-bind="attrs" v-else>{{ currentValue }}</a-divider>
</template>

<script>
import { COMPONENT_TYPE } from '../../constants'
import ComponentMixin from '../../XRenderMixins/XRenderComponentMixin'
import XRenderExtendSlotMixin from '../../XRenderMixins/XRenderExtendSlotMixin'

export default {
  name: COMPONENT_TYPE.LAYOUT_DIVIDER,
  mixins: [ComponentMixin, XRenderExtendSlotMixin],
  computed: {
    currentValue: {
      get() {
        const { attrs } = this
        return attrs.value || ''
      }
    }
  }
}
</script>

<style scoped>

</style>
